Keep start_info in page provided by domain builder instead of making a copy.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 5 Sep 2005 14:04:36 +0000 (14:04 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 5 Sep 2005 14:04:36 +0000 (14:04 +0000)
- page is moved next to store/console pages -- these are never put in the
  free page pool by the domain
- xen_start_info is now a pointer to the original page instead of the copy
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
35 files changed:
linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c
linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S
linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c
linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c
linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
linux-2.6-xen-sparse/drivers/xen/console/console.c
linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c
linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c
linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
linux-2.6-xen-sparse/include/asm-xen/asm-i386/setup.h
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h
linux-2.6-xen-sparse/include/asm-xen/hypervisor.h
tools/libxc/xc_linux_build.c
xen/arch/x86/domain_build.c

index 501ea3fce86f887d3dfa5f345d7809b1b68ffffa..41808f1711712e5424973441e918f1e0986fd1e5 100644 (file)
@@ -147,7 +147,7 @@ static int __init mtrr_init(void)
 {
        struct cpuinfo_x86 *c = &boot_cpu_data;
 
-       if (!(xen_start_info.flags & SIF_PRIVILEGED))
+       if (!(xen_start_info->flags & SIF_PRIVILEGED))
                return -ENODEV;
 
        if ((!cpu_has(c, X86_FEATURE_MTRR)) &&
index 2c5295714b549948e8f7ec6aa8a0a61d348d22b2..35c68031fbf9cbf3098a0391d9e64fecc309b980 100644 (file)
 #define X86_VENDOR_ID  new_cpu_data+CPUINFO_x86_vendor_id
 
 ENTRY(startup_32)
-       cld
-
-       /* Copy the necessary stuff from xen_start_info structure. */
-       mov  $xen_start_info_union,%edi
-       mov  $512,%ecx
-       rep movsl
+       movl %esi,xen_start_info
 
 #ifdef CONFIG_SMP
 ENTRY(startup_32_smp)
-       cld
 #endif /* CONFIG_SMP */
 
+       cld
+
        /* Set up the stack pointer */
        lss stack_start,%esp
 
index bd1babe7425bb85705bb1e5fe90c08a40fec86ab..1cbe2bb77eb2261122f3fda7b334f4f770cbe120 100644 (file)
@@ -289,7 +289,7 @@ static void __init probe_roms(void)
        int           i;
 
        /* Nothing to do if not running in dom0. */
-       if (!(xen_start_info.flags & SIF_INITDOMAIN))
+       if (!(xen_start_info->flags & SIF_INITDOMAIN))
                return;
 
        /* video rom */
@@ -363,7 +363,7 @@ unsigned int *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
 /* Raw start-of-day parameters from the hypervisor. */
-union xen_start_info_union xen_start_info_union;
+start_info_t *xen_start_info;
 
 static void __init limit_regions(unsigned long long size)
 {
@@ -703,7 +703,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
 
        if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
                max_cmdline = COMMAND_LINE_SIZE;
-       memcpy(saved_command_line, xen_start_info.cmd_line, max_cmdline);
+       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
        /* Save unparsed command line copy for /proc/cmdline */
        saved_command_line[max_cmdline-1] = '\0';
 
@@ -934,8 +934,8 @@ void __init find_max_pfn(void)
 /* We don't use the fake e820 because we need to respond to user override. */
 void __init find_max_pfn(void)
 {
-       if ( xen_override_max_pfn < xen_start_info.nr_pages )
-               xen_override_max_pfn = xen_start_info.nr_pages;
+       if ( xen_override_max_pfn < xen_start_info->nr_pages )
+               xen_override_max_pfn = xen_start_info->nr_pages;
        max_pfn = xen_override_max_pfn;
 }
 #endif /* XEN */
@@ -1082,8 +1082,8 @@ static unsigned long __init setup_memory(void)
         * partially used pages are not usable - thus
         * we are rounding upwards:
         */
-       min_low_pfn = PFN_UP(__pa(xen_start_info.pt_base)) +
-               xen_start_info.nr_pt_frames;
+       min_low_pfn = PFN_UP(__pa(xen_start_info->pt_base)) +
+               xen_start_info->nr_pt_frames;
 
        find_max_pfn();
 
@@ -1189,7 +1189,7 @@ void __init setup_bootmem_allocator(void)
 #endif /* !CONFIG_XEN */
 
 #ifdef CONFIG_BLK_DEV_INITRD
-       if (xen_start_info.mod_start) {
+       if (xen_start_info->mod_start) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
                        /*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
                        initrd_start = INITRD_START + PAGE_OFFSET;
@@ -1206,7 +1206,7 @@ void __init setup_bootmem_allocator(void)
        }
 #endif
 
-       phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
+       phys_to_machine_mapping = (unsigned int *)xen_start_info->mfn_list;
 }
 
 /*
@@ -1280,7 +1280,7 @@ static void __init register_memory(void)
        else
                legacy_init_iomem_resources(&code_resource, &data_resource);
 
-       if (xen_start_info.flags & SIF_INITDOMAIN)
+       if (xen_start_info->flags & SIF_INITDOMAIN)
                /* EFI systems may still have VGA */
                request_resource(&iomem_resource, &video_ram_resource);
 
@@ -1536,8 +1536,8 @@ void __init setup_arch(char **cmdline_p)
        init_mm.start_code = (unsigned long) _text;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
-       init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) +
-                      xen_start_info.nr_pt_frames) << PAGE_SHIFT;
+       init_mm.brk = (PFN_UP(__pa(xen_start_info->pt_base)) +
+                      xen_start_info->nr_pt_frames) << PAGE_SHIFT;
 
        /* XEN: This is nonsense: kernel may not even be contiguous in RAM. */
        /*code_resource.start = virt_to_phys(_text);*/
@@ -1574,37 +1574,37 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
        /* Make sure we have a correctly sized P->M table. */
-       if (max_pfn != xen_start_info.nr_pages) {
+       if (max_pfn != xen_start_info->nr_pages) {
                phys_to_machine_mapping = alloc_bootmem_low_pages(
                        max_pfn * sizeof(unsigned int));
 
-               if (max_pfn > xen_start_info.nr_pages) {
+               if (max_pfn > xen_start_info->nr_pages) {
                        /* set to INVALID_P2M_ENTRY */
                        memset(phys_to_machine_mapping, ~0,
                                max_pfn * sizeof(unsigned int));
                        memcpy(phys_to_machine_mapping,
-                               (unsigned int *)xen_start_info.mfn_list,
-                               xen_start_info.nr_pages * sizeof(unsigned int));
+                               (unsigned int *)xen_start_info->mfn_list,
+                               xen_start_info->nr_pages * sizeof(unsigned int));
                } else {
                        struct xen_memory_reservation reservation = {
-                               .extent_start = (unsigned long *)xen_start_info.mfn_list + max_pfn,
-                               .nr_extents   = xen_start_info.nr_pages - max_pfn,
+                               .extent_start = (unsigned long *)xen_start_info->mfn_list + max_pfn,
+                               .nr_extents   = xen_start_info->nr_pages - max_pfn,
                                .extent_order = 0,
                                .domid        = DOMID_SELF
                        };
 
                        memcpy(phys_to_machine_mapping,
-                               (unsigned int *)xen_start_info.mfn_list,
+                               (unsigned int *)xen_start_info->mfn_list,
                                max_pfn * sizeof(unsigned int));
                        /* N.B. below relies on sizeof(int) == sizeof(long). */
                        BUG_ON(HYPERVISOR_memory_op(
                                XENMEM_decrease_reservation,
                                &reservation) !=
-                           (xen_start_info.nr_pages - max_pfn));
+                           (xen_start_info->nr_pages - max_pfn));
                }
                free_bootmem(
-                       __pa(xen_start_info.mfn_list), 
-                       PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
+                       __pa(xen_start_info->mfn_list), 
+                       PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
                        sizeof(unsigned int))));
        }
 
@@ -1633,7 +1633,7 @@ void __init setup_arch(char **cmdline_p)
        }
 #endif
 
-       if (xen_start_info.flags & SIF_INITDOMAIN)
+       if (xen_start_info->flags & SIF_INITDOMAIN)
                dmi_scan_machine();
 
 #ifdef CONFIG_X86_GENERICARCH
@@ -1647,7 +1647,7 @@ void __init setup_arch(char **cmdline_p)
        HYPERVISOR_physdev_op(&op);
 
 #ifdef CONFIG_ACPI_BOOT
-       if (!(xen_start_info.flags & SIF_INITDOMAIN)) {
+       if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
                printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
                acpi_disabled = 1;
                acpi_ht = 0;
@@ -1673,8 +1673,8 @@ void __init setup_arch(char **cmdline_p)
 
        register_memory();
 
-       if (xen_start_info.flags & SIF_INITDOMAIN) {
-               if (!(xen_start_info.flags & SIF_PRIVILEGED))
+       if (xen_start_info->flags & SIF_INITDOMAIN) {
+               if (!(xen_start_info->flags & SIF_PRIVILEGED))
                        panic("Xen granted us console access "
                              "but not privileged status");
 
index 8d8fe38bf5c57ff76230ccb2615409107a41853f..d72d9203763e0b1eb9cee392b1d965636b4d6806 100644 (file)
@@ -181,7 +181,7 @@ swiotlb_init(void)
          * Otherwise, enable for domain 0 if the machine has 'lots of memory',
          * which we take to mean more than 2GB.
          */
-       if (xen_start_info.flags & SIF_INITDOMAIN) {
+       if (xen_start_info->flags & SIF_INITDOMAIN) {
                dom0_op_t op;
                op.cmd = DOM0_PHYSINFO;
                if ((HYPERVISOR_dom0_op(&op) == 0) &&
index 3b85e34798ab8a100b2361e4c4f7185fbeacff9f..7f5454e1ee7a4bf04de46a95be0e40086b880ff4 100644 (file)
@@ -445,7 +445,7 @@ int do_settimeofday(struct timespec *tv)
        sec = tv->tv_sec;
        __normalize_time(&sec, &nsec);
 
-       if ((xen_start_info.flags & SIF_INITDOMAIN) &&
+       if ((xen_start_info->flags & SIF_INITDOMAIN) &&
            !independent_wallclock) {
                op.cmd = DOM0_SETTIME;
                op.u.settime.secs        = sec;
@@ -476,7 +476,7 @@ static int set_rtc_mmss(unsigned long nowtime)
 
        WARN_ON(irqs_disabled());
 
-       if (!(xen_start_info.flags & SIF_INITDOMAIN))
+       if (!(xen_start_info->flags & SIF_INITDOMAIN))
                return 0;
 
        /* gets recalled with irq locally disabled */
index ba3c9a6b274631d0cae0dbb1a4b75ed3c16434ed..4ef646b3fea4fe7f46a7417707fdae1aea6794ce 100644 (file)
@@ -159,7 +159,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
        pte_t *pte;
        int pgd_idx, pmd_idx, pte_ofs;
 
-       unsigned long max_ram_pfn = xen_start_info.nr_pages;
+       unsigned long max_ram_pfn = xen_start_info->nr_pages;
        if (max_ram_pfn > max_low_pfn)
                max_ram_pfn = max_low_pfn;
 
@@ -317,7 +317,7 @@ void __init one_highpage_init(struct page *page, int pfn, int bad_ppro)
                ClearPageReserved(page);
                set_bit(PG_highmem, &page->flags);
                set_page_count(page, 1);
-               if (pfn < xen_start_info.nr_pages)
+               if (pfn < xen_start_info->nr_pages)
                        __free_page(page);
                totalhigh_pages++;
        } else
@@ -356,7 +356,7 @@ pgd_t *swapper_pg_dir;
 static void __init pagetable_init (void)
 {
        unsigned long vaddr;
-       pgd_t *pgd_base = (pgd_t *)xen_start_info.pt_base;
+       pgd_t *pgd_base = (pgd_t *)xen_start_info->pt_base;
        int i;
 
        swapper_pg_dir = pgd_base;
@@ -535,14 +535,14 @@ void __init paging_init(void)
        kmap_init();
 
        /* Switch to the real shared_info page, and clear the dummy page. */
-       set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
+       set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
        HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
        memset(empty_zero_page, 0, sizeof(empty_zero_page));
 
 #ifdef CONFIG_XEN_PHYSDEV_ACCESS
        /* Setup mapping of lower 1st MB */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
-               if (xen_start_info.flags & SIF_PRIVILEGED)
+               if (xen_start_info->flags & SIF_PRIVILEGED)
                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                else
                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
@@ -639,7 +639,7 @@ void __init mem_init(void)
        /* this will put all low memory onto the freelists */
        totalram_pages += free_all_bootmem();
        /* XEN: init and count low-mem pages outside initial allocation. */
-       for (pfn = xen_start_info.nr_pages; pfn < max_low_pfn; pfn++) {
+       for (pfn = xen_start_info->nr_pages; pfn < max_low_pfn; pfn++) {
                ClearPageReserved(&mem_map[pfn]);
                set_page_count(&mem_map[pfn], 1);
                totalram_pages++;
index 820eabd779ca377fca50ba7a33d2892a2b1335ee..8e14408d540015a85745bbf7efe7c26eee21d2d8 100644 (file)
@@ -178,7 +178,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
-       if (xen_start_info.flags & SIF_PRIVILEGED &&
+       if (xen_start_info->flags & SIF_PRIVILEGED &&
            phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
                return (void __iomem *) isa_bus_to_virt(phys_addr);
 
@@ -332,7 +332,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
-       if (xen_start_info.flags & SIF_PRIVILEGED &&
+       if (xen_start_info->flags & SIF_PRIVILEGED &&
            phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
                return isa_bus_to_virt(phys_addr);
 
index 733103f475b1edd2ec60a5efe6fcd3e682298639..583188d3908cb88b73349479ad39ddb75380b911 100644 (file)
@@ -483,7 +483,7 @@ void ctrl_if_resume(void)
 {
     control_if_t *ctrl_if = get_ctrl_if();
 
-    if ( xen_start_info.flags & SIF_INITDOMAIN )
+    if ( xen_start_info->flags & SIF_INITDOMAIN )
     {
         /*
          * The initial domain must create its own domain-controller link.
@@ -500,7 +500,7 @@ void ctrl_if_resume(void)
         op.u.bind_interdomain.port2 = 0;
         if ( HYPERVISOR_event_channel_op(&op) != 0 )
             BUG();
-        xen_start_info.domain_controller_evtchn = op.u.bind_interdomain.port1;
+        xen_start_info->domain_controller_evtchn = op.u.bind_interdomain.port1;
         initdom_ctrlif_domcontroller_port   = op.u.bind_interdomain.port2;
        bind_evtchn_to_cpu(op.u.bind_interdomain.port1, 0);
     }
@@ -509,7 +509,7 @@ void ctrl_if_resume(void)
     FRONT_RING_ATTACH(&ctrl_if_tx_ring, &ctrl_if->tx_ring, CONTROL_RING_MEM);
     BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring, CONTROL_RING_MEM);
 
-    ctrl_if_evtchn = xen_start_info.domain_controller_evtchn;
+    ctrl_if_evtchn = xen_start_info->domain_controller_evtchn;
     ctrl_if_irq    = bind_evtchn_to_irq(ctrl_if_evtchn);
 
     memset(&ctrl_if_irq_action, 0, sizeof(ctrl_if_irq_action));
index 49164498ab5f083947af376ec8c7502c9054215f..19a760ee7abafca8c06c8c621b69b4abe056af87 100644 (file)
@@ -185,8 +185,8 @@ static int __do_suspend(void *ignore)
     HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
     clear_fixmap(FIX_SHARED_INFO);
 
-    memcpy(&suspend_record->resume_info, &xen_start_info,
-           sizeof(xen_start_info));
+    memcpy(&suspend_record->resume_info, xen_start_info,
+           sizeof(*xen_start_info));
 
     /* We'll stop somewhere inside this hypercall.  When it returns,
        we'll start resuming after the restore. */
@@ -194,10 +194,10 @@ static int __do_suspend(void *ignore)
 
     shutting_down = SHUTDOWN_INVALID; 
 
-    memcpy(&xen_start_info, &suspend_record->resume_info,
-           sizeof(xen_start_info));
+    memcpy(xen_start_info, &suspend_record->resume_info,
+           sizeof(*xen_start_info));
 
-    set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
+    set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
 
     HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
 
index 71a1189f9ae4598e8cead9a1110a6337533be80e..8ca939aef1500ba2644441090d7c79e638e592ec 100644 (file)
@@ -524,7 +524,7 @@ extern union xen_start_info_union xen_start_info_union;
  */
 unsigned long __init e820_end_of_ram(void)
 {
-        unsigned long max_end_pfn = xen_start_info.nr_pages;
+        unsigned long max_end_pfn = xen_start_info->nr_pages;
 
        if ( xen_override_max_pfn <  max_end_pfn)
                xen_override_max_pfn = max_end_pfn;
index 252af49d555818b7aab3038143b71a7f9656b635..b1418e6afeb31f164fad31c61c52da0f70bbebf9 100644 (file)
        .globl startup_64
 startup_64:
 ENTRY(_start)
-        cld                
-       /* Copy the necessary stuff from xen_start_info structure. */
-       movq  $xen_start_info_union,%rdi
-       movq  $256,%rcx
-       rep movsq
+       movq %rsi,xen_start_info(%rip)
 
 #ifdef CONFIG_SMP
-        ENTRY(startup_64_smp)
-       cld
+ENTRY(startup_64_smp)
 #endif /* CONFIG_SMP */
 
+       cld
+
        movq init_rsp(%rip),%rsp
        /* zero EFLAGS after setting rsp */
        pushq $0
index 990f8fb190902a981adbf047cb692bb1a66d9d50..68e79771c05b49eb4c3ed969beae736d3c94453d 100644 (file)
@@ -90,8 +90,9 @@ void __init x86_64_start_kernel(char * real_mode_data)
 {
        int i;
 
-        phys_to_machine_mapping = (u32 *)xen_start_info.mfn_list;
-        start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) +  xen_start_info.nr_pt_frames;
+        phys_to_machine_mapping = (u32 *)xen_start_info->mfn_list;
+        start_pfn = (__pa(xen_start_info->pt_base) >> PAGE_SHIFT) + 
+               xen_start_info->nr_pt_frames;
 
        for (i = 0; i < 256; i++)
                set_intr_gate(i, early_idt_handler);
index d92ce1aa3c47fb8bcb382c8c7be2663c9bca5db4..ca1225eb6f445f62b2adf6f0019929897a34633d 100644 (file)
@@ -84,7 +84,7 @@ DEFINE_PER_CPU(multicall_entry_t, multicall_list[8]);
 DEFINE_PER_CPU(int, nr_multicall_ents);
 
 /* Raw start-of-day parameters from the hypervisor. */
-union xen_start_info_union xen_start_info_union;
+start_info_t *xen_start_info;
 #endif
 
 /*
@@ -314,7 +314,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
        
        if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
                max_cmdline = COMMAND_LINE_SIZE;
-       memcpy(saved_command_line, xen_start_info.cmd_line, max_cmdline);
+       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
        saved_command_line[max_cmdline-1] = '\0';
 #else
        memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
@@ -687,7 +687,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #ifdef CONFIG_XEN
 #ifdef CONFIG_BLK_DEV_INITRD
-       if (xen_start_info.mod_start) {
+       if (xen_start_info->mod_start) {
                if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
                        /*reserve_bootmem_generic(INITRD_START, INITRD_SIZE);*/
                        initrd_start = INITRD_START + PAGE_OFFSET;
@@ -732,17 +732,17 @@ void __init setup_arch(char **cmdline_p)
        {
                int i, j;
                /* Make sure we have a large enough P->M table. */
-               if (end_pfn > xen_start_info.nr_pages) {
+               if (end_pfn > xen_start_info->nr_pages) {
                        phys_to_machine_mapping = alloc_bootmem(
                                end_pfn * sizeof(u32));
                        memset(phys_to_machine_mapping, ~0,
                               end_pfn * sizeof(u32));
                        memcpy(phys_to_machine_mapping,
-                              (u32 *)xen_start_info.mfn_list,
-                              xen_start_info.nr_pages * sizeof(u32));
+                              (u32 *)xen_start_info->mfn_list,
+                              xen_start_info->nr_pages * sizeof(u32));
                        free_bootmem(
-                               __pa(xen_start_info.mfn_list), 
-                               PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
+                               __pa(xen_start_info->mfn_list), 
+                               PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
                                                sizeof(u32))));
                }
 
@@ -814,8 +814,8 @@ void __init setup_arch(char **cmdline_p)
               op.u.set_iopl.iopl = 1;
               HYPERVISOR_physdev_op(&op);
 
-              if (xen_start_info.flags & SIF_INITDOMAIN) {
-                      if (!(xen_start_info.flags & SIF_PRIVILEGED))
+              if (xen_start_info->flags & SIF_INITDOMAIN) {
+                      if (!(xen_start_info->flags & SIF_PRIVILEGED))
                               panic("Xen granted us console access "
                                     "but not privileged status");
                       
index 437ccac06e3534882f73304b1770eb95abfdf039..a2182d5c9833ea9331e686df05d0202db700b346 100644 (file)
@@ -423,7 +423,7 @@ static inline int make_readonly(unsigned long paddr)
        int readonly = 0;
 
        /* Make old and new page tables read-only. */
-       if ((paddr >= (xen_start_info.pt_base - __START_KERNEL_map))
+       if ((paddr >= (xen_start_info->pt_base - __START_KERNEL_map))
            && (paddr < ((table_start << PAGE_SHIFT) + tables_space)))
                readonly = 1;
        /*
@@ -474,8 +474,8 @@ static void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned lon
                         pte_save = pte;
                         for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr += PTE_SIZE) {
                                 if ((paddr >= end) ||
-                                    ((paddr >> PAGE_SHIFT)
-                                     >= xen_start_info.nr_pages)) { 
+                                    ((paddr >> PAGE_SHIFT) >=
+                                     xen_start_info->nr_pages)) { 
                                         __set_pte(pte, __pte(0)); 
                                         continue;
                                 }
@@ -522,7 +522,7 @@ void __init xen_init_pt(void)
        memset((void *)level2_kernel_pgt, 0, PAGE_SIZE);
 
        /* Find the initial pte page that was built for us. */
-       page = (unsigned long *)xen_start_info.pt_base;
+       page = (unsigned long *)xen_start_info->pt_base;
        addr = page[pgd_index(__START_KERNEL_map)];
        addr_to_page(addr, page);
        addr = page[pud_index(__START_KERNEL_map)];
@@ -671,7 +671,7 @@ void __init paging_init(void)
                free_area_init(zones_size);
        }
 
-        set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
+        set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
         HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
 
         memset(empty_zero_page, 0, sizeof(empty_zero_page));
@@ -682,7 +682,7 @@ void __init paging_init(void)
                int i;
         /* Setup mapping of lower 1st MB */
                for (i = 0; i < NR_FIX_ISAMAPS; i++)
-                       if (xen_start_info.flags & SIF_PRIVILEGED)
+                       if (xen_start_info->flags & SIF_PRIVILEGED)
                                set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                        else
                                __set_fixmap(FIX_ISAMAP_BEGIN - i,
index ef76df83ec635683da8b1b7eab8002f811aaed30..6c0df1bec7d125288013750efde297bb95182c4f 100644 (file)
@@ -402,7 +402,7 @@ static int __init balloon_init(void)
 
        IPRINTK("Initialising balloon driver.\n");
 
-       current_pages = min(xen_start_info.nr_pages, max_pfn);
+       current_pages = min(xen_start_info->nr_pages, max_pfn);
        target_pages  = current_pages;
        balloon_low   = 0;
        balloon_high  = 0;
@@ -422,7 +422,7 @@ static int __init balloon_init(void)
        balloon_pde->write_proc = balloon_write;
     
        /* Initialise the balloon with excess memory space. */
-       for (pfn = xen_start_info.nr_pages; pfn < max_pfn; pfn++) {
+       for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
                page = &mem_map[pfn];
                if (!PageReserved(page))
                        balloon_append(page);
index f2352d715805460bbd92c7ceaba1758086dfe4f4..5f87070e7aadad8222cb9e917ef3aae1890b0ed3 100644 (file)
@@ -504,8 +504,8 @@ static int __init blkif_init(void)
     int i;
     struct page *page;
 
-    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
-         !(xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
+    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
+         !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
         return 0;
 
     blkif_interface_init();
index 136f7d68d90cff11c51bcd93e894da49b2daee12..a507f66d939c5f30fee1450ce89279bcafe857e4 100644 (file)
@@ -757,8 +757,8 @@ static int wait_for_blkif(void)
 
 static int __init xlblk_init(void)
 {
-       if ((xen_start_info.flags & SIF_INITDOMAIN)
-           || (xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
+       if ((xen_start_info->flags & SIF_INITDOMAIN) ||
+           (xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
                return 0;
 
        IPRINTK("Initialising virtual block device driver\n");
index 4d0b88c8ee377610f0ecf1537934ce9c047f8ba4..6041122f3f1ba127b6f111fbb55ec5959322f833 100644 (file)
@@ -873,8 +873,8 @@ static int __init blkif_init(void)
     int i, j, err;
     struct page *page;
 /*
-    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
-         !(xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
+    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
+         !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
         return 0;
 */
     blkif_interface_init();
index f19dd485e3854e552d17480b6a4473d5c49f5360..129cabec66c7caced34b7be7f0d80e4d95601740 100644 (file)
@@ -195,7 +195,7 @@ static int __init xen_console_init(void)
 void xen_console_init(void)
 #endif
 {
-    if ( xen_start_info.flags & SIF_INITDOMAIN )
+    if ( xen_start_info->flags & SIF_INITDOMAIN )
     {
         if ( xc_mode == XC_DEFAULT )
             xc_mode = XC_SERIAL;
@@ -266,7 +266,7 @@ void xencons_force_flush(void)
     int        sz;
 
     /* Emergency console is synchronous, so there's nothing to flush. */
-    if ( xen_start_info.flags & SIF_INITDOMAIN )
+    if ( xen_start_info->flags & SIF_INITDOMAIN )
         return;
 
 
@@ -342,7 +342,7 @@ static void __xencons_tx_flush(void)
 {
     int        sz, work_done = 0;
 
-    if ( xen_start_info.flags & SIF_INITDOMAIN )
+    if ( xen_start_info->flags & SIF_INITDOMAIN )
     {
         if ( x_char )
         {
@@ -770,7 +770,7 @@ static int __init xencons_init(void)
     tty_register_device(xencons_driver, 0, NULL);
 #endif
 
-    if ( xen_start_info.flags & SIF_INITDOMAIN )
+    if ( xen_start_info->flags & SIF_INITDOMAIN )
     {
         xencons_priv_irq = bind_virq_to_irq(VIRQ_CONSOLE);
         (void)request_irq(xencons_priv_irq,
index 6083c6a326ad4ba98496762e4d44abf5cd82ec32..eb205ee37759d3efd156caea051df6ab338acaf1 100644 (file)
@@ -36,12 +36,12 @@ struct ring_head
 
 static inline struct ring_head *outring(void)
 {
-       return machine_to_virt(xen_start_info.console_mfn << PAGE_SHIFT);
+       return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT);
 }
 
 static inline struct ring_head *inring(void)
 {
-       return machine_to_virt(xen_start_info.console_mfn << PAGE_SHIFT)
+       return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT)
                + PAGE_SIZE/2;
 }
 
@@ -68,7 +68,7 @@ int xencons_ring_send(const char *data, unsigned len)
        int sent = 0;
        
        sent = __xencons_ring_send(out, data, len);
-       notify_via_evtchn(xen_start_info.console_evtchn);
+       notify_via_evtchn(xen_start_info->console_evtchn);
        return sent;
 
 }      
@@ -98,10 +98,10 @@ int xencons_ring_init(void)
 {
        int err;
 
-       if (!xen_start_info.console_evtchn)
+       if (!xen_start_info->console_evtchn)
                return 0;
 
-       err = bind_evtchn_to_irqhandler(xen_start_info.console_evtchn,
+       err = bind_evtchn_to_irqhandler(xen_start_info->console_evtchn,
                                        handle_input, 0, "xencons", inring());
        if (err) {
                xprintk("XEN console request irq failed %i\n", err);
@@ -114,10 +114,11 @@ int xencons_ring_init(void)
 void xencons_suspend(void)
 {
 
-       if (!xen_start_info.console_evtchn)
+       if (!xen_start_info->console_evtchn)
                return;
 
-       unbind_evtchn_from_irqhandler(xen_start_info.console_evtchn, inring());
+       unbind_evtchn_from_irqhandler(xen_start_info->console_evtchn,
+                                     inring());
 }
 
 void xencons_resume(void)
index f90d6f3572ad0cec77ca87b9b48b05155aa38969..32ceb5f0b9d5afdfe3754c7a594dd4a45e7cd198 100644 (file)
@@ -940,8 +940,8 @@ static int __init netback_init(void)
     int i;
     struct page *page;
 
-    if ( !(xen_start_info.flags & SIF_NET_BE_DOMAIN) &&
-         !(xen_start_info.flags & SIF_INITDOMAIN) )
+    if ( !(xen_start_info->flags & SIF_NET_BE_DOMAIN) &&
+         !(xen_start_info->flags & SIF_INITDOMAIN) )
         return 0;
 
     IPRINTK("Initialising Xen netif backend.\n");
index 08db931a4af3e598ef826a35615ecc56a026a802..45755083deb231fabd13f8a82c03e82863a129b9 100644 (file)
@@ -1369,7 +1369,7 @@ static int __init netif_init(void)
 {
     int err = 0;
 
-    if (xen_start_info.flags & SIF_INITDOMAIN)
+    if (xen_start_info->flags & SIF_INITDOMAIN)
         return 0;
 
     if ((err = xennet_proc_init()) != 0)
index 8877ddef72007bf08efd518fa90d355a143965b4..76c87379636a8e7d16eccebafb4db42acdea5f91 100644 (file)
@@ -205,8 +205,8 @@ static int privcmd_ioctl(struct inode *inode, struct file *file,
         extern int do_xenbus_probe(void*);
         unsigned long page;
 
-        if (xen_start_info.store_evtchn != 0) {
-            ret = xen_start_info.store_mfn;
+        if (xen_start_info->store_evtchn != 0) {
+            ret = xen_start_info->store_mfn;
             break;
         }
 
@@ -222,10 +222,10 @@ static int privcmd_ioctl(struct inode *inode, struct file *file,
         SetPageReserved(virt_to_page(page));
 
         /* Initial connect. Setup channel and page. */
-        xen_start_info.store_evtchn = data;
-        xen_start_info.store_mfn = pfn_to_mfn(virt_to_phys((void *)page) >>
+        xen_start_info->store_evtchn = data;
+        xen_start_info->store_mfn = pfn_to_mfn(virt_to_phys((void *)page) >>
                                               PAGE_SHIFT);
-        ret = xen_start_info.store_mfn;
+        ret = xen_start_info->store_mfn;
 
         /* We'll return then this will wait for daemon to answer */
         kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
index 731b8557c4dfbfae76f4873371c6d78707c706b0..ab79feb4fc94b4578163b6c68e6a2f6377513e31 100644 (file)
@@ -1047,8 +1047,8 @@ static int __init
 tpmback_init(void)
 {
        int rc;
-       if (!(xen_start_info.flags & SIF_TPM_BE_DOMAIN) &&
-           !(xen_start_info.flags & SIF_INITDOMAIN)) {
+       if (!(xen_start_info->flags & SIF_TPM_BE_DOMAIN) &&
+           !(xen_start_info->flags & SIF_INITDOMAIN)) {
                printk(KERN_ALERT "Neither TPM-BE Domain nor INIT domain!\n");
                return 0;
        }
index a8f4ad804d855c8e59ad1dbe0b3c7032e9f84898..043ab73eeb97d69282ccf2c351d3842e11181958 100644 (file)
@@ -1029,8 +1029,8 @@ static int __init usbif_init(void)
     int i;
     struct page *page;
 
-    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
-         !(xen_start_info.flags & SIF_USB_BE_DOMAIN) )
+    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
+         !(xen_start_info->flags & SIF_USB_BE_DOMAIN) )
         return 0;
 
     page = balloon_alloc_empty_page_range(MMAP_PAGES);
index b745c1d695a05b3c88d792b37bc0521ceca65c5b..403ebbdf099a1782dd656da22f2c52290e113766 100644 (file)
@@ -1675,8 +1675,8 @@ static int __init xhci_hcd_init(void)
 {
        int retval = -ENOMEM, i;
 
-       if ( (xen_start_info.flags & SIF_INITDOMAIN)
-            || (xen_start_info.flags & SIF_USB_BE_DOMAIN) )
+       if ( (xen_start_info->flags & SIF_INITDOMAIN) ||
+            (xen_start_info->flags & SIF_USB_BE_DOMAIN) )
                 return 0;
 
        info(DRIVER_DESC " " DRIVER_VERSION);
index 6ea32b5394d17e27d98021fc4dbf4d5755bf889f..3626d1086e527dab5b11e384136ecdd27fc963d4 100644 (file)
@@ -48,12 +48,12 @@ DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
 
 static inline struct ringbuf_head *outbuf(void)
 {
-       return mfn_to_virt(xen_start_info.store_mfn);
+       return mfn_to_virt(xen_start_info->store_mfn);
 }
 
 static inline struct ringbuf_head *inbuf(void)
 {
-       return mfn_to_virt(xen_start_info.store_mfn) + PAGE_SIZE/2;
+       return mfn_to_virt(xen_start_info->store_mfn) + PAGE_SIZE/2;
 }
 
 static irqreturn_t wake_waiting(int irq, void *unused, struct pt_regs *regs)
@@ -145,7 +145,7 @@ int xb_write(const void *data, unsigned len)
                data += avail;
                len -= avail;
                update_output_chunk(out, avail);
-               notify_via_evtchn(xen_start_info.store_evtchn);
+               notify_via_evtchn(xen_start_info->store_evtchn);
        } while (len != 0);
 
        return 0;
@@ -190,7 +190,7 @@ int xb_read(void *data, unsigned len)
                pr_debug("Finished read of %i bytes (%i to go)\n", avail, len);
                /* If it was full, tell them we've taken some. */
                if (was_full)
-                       notify_via_evtchn(xen_start_info.store_evtchn);
+                       notify_via_evtchn(xen_start_info->store_evtchn);
        }
 
        /* If we left something, wake watch thread to deal with it. */
@@ -205,20 +205,20 @@ int xb_init_comms(void)
 {
        int err;
 
-       if (!xen_start_info.store_evtchn)
+       if (!xen_start_info->store_evtchn)
                return 0;
 
        err = bind_evtchn_to_irqhandler(
-               xen_start_info.store_evtchn, wake_waiting,
+               xen_start_info->store_evtchn, wake_waiting,
                0, "xenbus", &xb_waitq);
        if (err) {
                printk(KERN_ERR "XENBUS request irq failed %i\n", err);
-               unbind_evtchn_from_irq(xen_start_info.store_evtchn);
+               unbind_evtchn_from_irq(xen_start_info->store_evtchn);
                return err;
        }
 
        /* FIXME zero out page -- domain builder should probably do this*/
-       memset(mfn_to_virt(xen_start_info.store_mfn), 0, PAGE_SIZE);
+       memset(mfn_to_virt(xen_start_info->store_mfn), 0, PAGE_SIZE);
 
        return 0;
 }
@@ -226,8 +226,8 @@ int xb_init_comms(void)
 void xb_suspend_comms(void)
 {
 
-       if (!xen_start_info.store_evtchn)
+       if (!xen_start_info->store_evtchn)
                return;
 
-       unbind_evtchn_from_irqhandler(xen_start_info.store_evtchn, &xb_waitq);
+       unbind_evtchn_from_irqhandler(xen_start_info->store_evtchn, &xb_waitq);
 }
index 2c9bd9877e594d3f47484fa64a14055ab6e8fa9a..44dfbc9c05c29833510cb95e4476c2edc3d7d2b9 100644 (file)
@@ -621,7 +621,7 @@ int register_xenstore_notifier(struct notifier_block *nb)
 
        down(&xenbus_lock);
 
-       if (xen_start_info.store_evtchn) {
+       if (xen_start_info->store_evtchn) {
                ret = nb->notifier_call(nb, 0, NULL);
        } else {
                notifier_chain_register(&xenstore_chain, nb);
@@ -647,7 +647,7 @@ int do_xenbus_probe(void *unused)
        int err = 0;
 
        /* Initialize xenstore comms unless already done. */
-       printk("store_evtchn = %i\n", xen_start_info.store_evtchn);
+       printk("store_evtchn = %i\n", xen_start_info->store_evtchn);
        err = xs_init();
        if (err) {
                printk("XENBUS: Error initializing xenstore comms:"
@@ -675,7 +675,7 @@ static int __init xenbus_probe_init(void)
        device_register(&xenbus_frontend.dev);
        device_register(&xenbus_backend.dev);
 
-       if (!xen_start_info.store_evtchn)
+       if (!xen_start_info->store_evtchn)
                return 0;
 
        do_xenbus_probe(NULL);
index 92d41bbf796dadd6e3a10adc1fd55dde8da83903..b30853d2cf5024bac98ed2e4e8ecdfcd44dc16a3 100644 (file)
@@ -8,7 +8,7 @@
 
 static char * __init machine_specific_memory_setup(void)
 {
-       unsigned long max_pfn = xen_start_info.nr_pages;
+       unsigned long max_pfn = xen_start_info->nr_pages;
 
        e820.nr_map = 0;
        add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
@@ -23,7 +23,7 @@ void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
        clear_bit(X86_FEATURE_PSE, c->x86_capability);
        clear_bit(X86_FEATURE_PGE, c->x86_capability);
        clear_bit(X86_FEATURE_SEP, c->x86_capability);
-       if (!(xen_start_info.flags & SIF_PRIVILEGED))
+       if (!(xen_start_info->flags & SIF_PRIVILEGED))
                clear_bit(X86_FEATURE_MTRR, c->x86_capability);
 }
 
index 0a0073ae713afc2fb96561403d8ba1347083a000..5161768219359a335eec2e40b4000bda73d36223 100644 (file)
@@ -53,8 +53,8 @@ extern unsigned char boot_params[PARAM_SIZE];
 #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
 #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
 #define KERNEL_START (*(unsigned long *) (PARAM+0x214))
-#define INITRD_START (__pa(xen_start_info.mod_start))
-#define INITRD_SIZE (xen_start_info.mod_len)
+#define INITRD_START (__pa(xen_start_info->mod_start))
+#define INITRD_SIZE (xen_start_info->mod_len)
 #define EDID_INFO   (*(struct edid_info *) (PARAM+0x440))
 #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
 #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
index e36521ab3553b3904595ed81222ca6d18d22ba01..7983eecd5628d8960dd5a22545f2caea5f3150c4 100644 (file)
@@ -25,8 +25,8 @@ extern char x86_boot_params[BOOT_PARAM_SIZE];
 #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
 #define KERNEL_START (*(unsigned int *) (PARAM+0x214))
 
-#define INITRD_START (__pa(xen_start_info.mod_start))
-#define INITRD_SIZE (xen_start_info.mod_len)
+#define INITRD_START (__pa(xen_start_info->mod_start))
+#define INITRD_SIZE (xen_start_info->mod_len)
 #define EDID_INFO   (*(struct edid_info *) (PARAM+0x440))
 
 #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
index 5761edd144e6b39d953903d1e974a23c1ab1d7bc..7be26e86600b14ff9688f965b0468860c2ac0a66 100644 (file)
@@ -14,7 +14,7 @@ static char * __init machine_specific_memory_setup(void)
        who = "Xen";
 
        start_pfn = 0;
-       max_pfn = xen_start_info.nr_pages;
+       max_pfn = xen_start_info->nr_pages;
 
        e820.nr_map = 0;
        add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
@@ -29,7 +29,7 @@ void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
        clear_bit(X86_FEATURE_PSE, c->x86_capability);
        clear_bit(X86_FEATURE_PGE, c->x86_capability);
        clear_bit(X86_FEATURE_SEP, c->x86_capability);
-       if (!(xen_start_info.flags & SIF_PRIVILEGED))
+       if (!(xen_start_info->flags & SIF_PRIVILEGED))
                clear_bit(X86_FEATURE_MTRR, c->x86_capability);
 }
 
index b87ec91e9335340992be5834f9317bc295535cff..3c7a42723af06e40aa1e25a82bf34b9c55634588 100644 (file)
 #endif
 
 /* arch/xen/i386/kernel/setup.c */
-union xen_start_info_union
-{
-    start_info_t xen_start_info;
-    char padding[2048];
-};
-extern union xen_start_info_union xen_start_info_union;
-#define xen_start_info (xen_start_info_union.xen_start_info)
+extern start_info_t *xen_start_info;
 
 /* arch/xen/kernel/evtchn.c */
 /* Force a proper event-channel callback from Xen. */
index 3c284ca980cd766004fc0c0bde26b924cfa13382..aa6e78156ec7466cdf5a4f63b4b8e24fa1fe0e25 100644 (file)
@@ -395,18 +395,18 @@ static int setup_guest(int xc_handle,
     vinitrd_end      = vinitrd_start + initrd_len;
     vphysmap_start   = round_pgup(vinitrd_end);
     vphysmap_end     = vphysmap_start + (nr_pages * sizeof(unsigned long));
-    vstoreinfo_start = round_pgup(vphysmap_end);
+    vstartinfo_start = round_pgup(vphysmap_end);
+    vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
+    vstoreinfo_start = vstartinfo_end;
     vstoreinfo_end   = vstoreinfo_start + PAGE_SIZE;
     vconsole_start   = vstoreinfo_end;
-    vconsole_end     = vstoreinfo_end + PAGE_SIZE;
+    vconsole_end     = vconsole_start + PAGE_SIZE;
     vpt_start        = vconsole_end; 
 
     for ( nr_pt_pages = 2; ; nr_pt_pages++ )
     {
         vpt_end          = vpt_start + (nr_pt_pages * PAGE_SIZE);
-        vstartinfo_start = vpt_end;
-        vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
-        vstack_start     = vstartinfo_end;
+        vstack_start     = vpt_end;
         vstack_end       = vstack_start + PAGE_SIZE;
         v_end            = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1);
         if ( (v_end - vstack_end) < (512UL << 10) )
@@ -442,19 +442,19 @@ static int setup_guest(int xc_handle,
            " Loaded kernel: %p->%p\n"
            " Init. ramdisk: %p->%p\n"
            " Phys-Mach map: %p->%p\n"
+           " Start info:    %p->%p\n"
            " Store page:    %p->%p\n"
            " Console page:  %p->%p\n"
            " Page tables:   %p->%p\n"
-           " Start info:    %p->%p\n"
            " Boot stack:    %p->%p\n"
            " TOTAL:         %p->%p\n",
            _p(dsi.v_kernstart), _p(dsi.v_kernend), 
            _p(vinitrd_start), _p(vinitrd_end),
            _p(vphysmap_start), _p(vphysmap_end),
+           _p(vstartinfo_start), _p(vstartinfo_end),
            _p(vstoreinfo_start), _p(vstoreinfo_end),
            _p(vconsole_start), _p(vconsole_end),
            _p(vpt_start), _p(vpt_end),
-           _p(vstartinfo_start), _p(vstartinfo_end),
            _p(vstack_start), _p(vstack_end),
            _p(dsi.v_start), _p(v_end));
     printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));
index 474ad1b18b1b7a5135f5dc7d6f3a50dcee8dde3a..0b9cbb1b29bff9f03eba6a79b77933d1e5743f31 100644 (file)
@@ -219,13 +219,13 @@ int construct_dom0(struct domain *d,
     vinitrd_end      = vinitrd_start + initrd_len;
     vphysmap_start   = round_pgup(vinitrd_end);
     vphysmap_end     = vphysmap_start + (nr_pages * sizeof(u32));
-    vpt_start        = round_pgup(vphysmap_end);
+    vstartinfo_start = round_pgup(vphysmap_end);
+    vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
+    vpt_start        = vstartinfo_end;
     for ( nr_pt_pages = 2; ; nr_pt_pages++ )
     {
         vpt_end          = vpt_start + (nr_pt_pages * PAGE_SIZE);
-        vstartinfo_start = vpt_end;
-        vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
-        vstack_start     = vstartinfo_end;
+        vstack_start     = vpt_end;
         vstack_end       = vstack_start + PAGE_SIZE;
         v_end            = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1);
         if ( (v_end - vstack_end) < (512UL << 10) )
@@ -272,15 +272,15 @@ int construct_dom0(struct domain *d,
            " Loaded kernel: %p->%p\n"
            " Init. ramdisk: %p->%p\n"
            " Phys-Mach map: %p->%p\n"
-           " Page tables:   %p->%p\n"
            " Start info:    %p->%p\n"
+           " Page tables:   %p->%p\n"
            " Boot stack:    %p->%p\n"
            " TOTAL:         %p->%p\n",
            _p(dsi.v_kernstart), _p(dsi.v_kernend), 
            _p(vinitrd_start), _p(vinitrd_end),
            _p(vphysmap_start), _p(vphysmap_end),
-           _p(vpt_start), _p(vpt_end),
            _p(vstartinfo_start), _p(vstartinfo_end),
+           _p(vpt_start), _p(vpt_end),
            _p(vstack_start), _p(vstack_end),
            _p(dsi.v_start), _p(v_end));
     printk(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));